package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.PersonItem;
import com.ruoyi.system.domain.ProjectAndPerson;
import com.ruoyi.system.mapper.PersonItemMapper;
import com.ruoyi.system.service.PersonItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PersonItemImpl implements PersonItemService {
@Autowired
    PersonItemMapper personItemMapper;

    @Override
    public int insert(PersonItem personItem) {
        return personItemMapper.insert(personItem);
    }

    @Override
    public List<PersonItem> showAll(String itemName) {
        return personItemMapper.showAll(itemName);
    }

    @Override
    public int update(PersonItem personItem) {
        return personItemMapper.update(personItem);
    }

    @Override
    public List<ProjectAndPerson> showPeopleTime(String itemId) {
        return personItemMapper.findByItemId(itemId);
    }

    @Override
    public PersonItem findById(String id) {
        return personItemMapper.findById(id);
    }
}
